import axios from "axios"

class getHttp {
    static baseUrl = `http://122.112.161.135:`
    static request(url) {
        return (
            axios({ url: this.baseUrl + url, methods: 'GET' })
                .then(res => { return res })
                .catch(err => { return err })
        )
    }
}

class getMovieHttp extends getHttp {
    static getMovieTopHttp() {
        return this.request(`4000/api/movie/top250`)
    }
    static getMovieDetailHttp(id) {
        return this.request(`4000/api/movieDetail?id=${id}`)
    }
}

export { getMovieHttp }